<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License

Name       : Reckoning
Description: A two-column, fixed-width design for 1024x768 screen resolutions.
Version    : 1.0
Released   : 20090629

-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Reckoning by Free CSS Templates</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>

<h1>Listing Utility Settings</h1>

<table>
  <tr>
    <th id="medium">Peak Start |</th>
    <th id="medium"> Peak End |</th>
    <th id="medium"> Peak Price |</th>
    <th id="medium"> Off-Peak Price |</th>
    <th id="medium">Override Level</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @utility_settings.each do |utility_setting| %>
  <tr>
    <td id="medium"><%= utility_setting.peak_start.strftime("%X") %></td>
    <td id="medium"><%= utility_setting.peak_end.strftime("%X") %></td>
    <td id="medium">$<%= utility_setting.peak_price %>0/kWh</td>
    <td id="medium">$<%= utility_setting.off_peak_price %>0/kWh</td>
    <td id="medium"><%= if utility_setting.override_lvl == 1
  		'Engage Full Control'
  	  elsif utility_setting.override_lvl == 2
  	  	'Engage Control Over Priority 2 & 3'
  	  elsif utility_setting.override_lvl == 3
  	  	'Engage Control Over Priority 3'
  	  elsif utility_setting.override_lvl == 4
  	  	'Override Off'
  	  end %></td>
    <td id="medium"><%= link_to 'Show', utility_setting %></td>
    <td id="medium"><%= link_to 'Edit', edit_utility_setting_path(utility_setting) %></td>
    <td id="medium"><%= link_to 'Destroy', utility_setting, confirm: 'Are you sure?', method: :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Utility Setting', new_utility_setting_path %><br /><br /><br /><br />
<table>
<tr>
	<td><%= link_to 'User Settings', user_settings_path %></td>
	<td>Utility Settings</td>
	<td><%= link_to 'Outlet Statuses', outlet_statuses_path %></td>
</tr>
</table>

</body>
</html>
